(function() {
    'use strict';

    angular
        .module('byibserverApp')
        .controller('WcInsuranceTypeDetailController', WcInsuranceTypeDetailController);

    WcInsuranceTypeDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'previousState', 'entity', 'WcInsuranceType'];

    function WcInsuranceTypeDetailController($scope, $rootScope, $stateParams, previousState, entity, WcInsuranceType) {
        var vm = this;

        vm.wcInsuranceType = entity;
        vm.previousState = previousState.name;

        var unsubscribe = $rootScope.$on('byibserverApp:wcInsuranceTypeUpdate', function(event, result) {
            vm.wcInsuranceType = result;
        });
        $scope.$on('$destroy', unsubscribe);
    }
})();
